package com.fancy.music.dto;

import lombok.Data;

import java.util.List;

@Data
public class GlobalSearchResultDTO {
    /**
     * 搜索关键词
     */
    private String keyword;

    /**
     * 歌曲搜索结果
     */
    private List<SongDetailDTO> songs;

    /**
     * 歌手搜索结果
     */
    private List<ArtistDetailDTO> artists;

    /**
     * 专辑搜索结果
     */
    private List<AlbumDetailDTO> albums;

    /**
     * 歌曲总数
     */
    private Long songCount;

    /**
     * 歌手总数
     */
    private Long artistCount;

    /**
     * 专辑总数
     */
    private Long albumCount;

    /**
     * 搜索总数
     */
    private Long totalCount;

    public GlobalSearchResultDTO() {
        this.songCount = 0L;
        this.artistCount = 0L;
        this.albumCount = 0L;
        this.totalCount = 0L;
    }

    public void calculateTotalCount() {
        this.totalCount = this.songCount + this.artistCount + this.albumCount;
    }
}
